<?php

namespace app\common\validate;

use think\Validate;

class User extends Validate
{
    protected $rule = [
        'name' => 'require|unique:user|length:2,64',
        // 'password' => 'require',
        'email' => 'email',
    ];
    protected $message = [
        'name.require' => '名称必须',
        'name.unique' => '名称已被注册',
        'name.length' => '名称长度2-64',
        // 'password' => '密码必填',
        'email' => '邮箱出错',
    ];
}